An electronic key system known in the prior art allows a door lock to be switched between a locked state and an unlocked state or allows the engine to be started when wireless communication is established between an electronic key and a vehicle.
The electronic key used in the electronic key system of patent document 1 includes a vibration sensor. The electronic key establishes wireless communication with the vehicle when the vibration sensor detects vibration. When the electronic key is still such as when the electronic key is stored in a residence, the electronic key does not perform wireless communication. Thus, wireless communication cannot be established in an unauthorized manner between the electronic key and the vehicle even when using a relay that relays radio waves.